﻿using System.ServiceModel;
using System.Web.Services.Protocols;
using EconomicInformationServiceWcf.ServiceBehaviours;
using Interfaces.Enums;
using ServiceInfrastructure.Models.Exceptions;
using ServiceInfrastructure.Models.NewsModels;
using ServiceInfrastructure.Models.SecurityModels;
using ServiceInfrastructure.ServiceConstants;

namespace EconomicInformationServiceWcf
{
    [ServiceContract(Name = ServiceConstants.NewsServicecontract,
        Namespace = ServiceConstants.NewsServicenamespace)]
    [EISHeaders]
    [EISApplication]
    public interface INewsInformationService
    {
        [OperationContract]
        [FaultContract(typeof(GeneralFault))]
        [FaultContract(typeof(BusinessFault))]
        [EISHeader(ServiceConstants.Headername,typeof(EISSession),Direction = SoapHeaderDirection.In)]
        [EISAutorize(Permissions = new [] {RoleType.User, RoleType.Admin })]
        GetNewsByUrlResponse GetNewsByUrl(GetNewsByUrlRequest request);

        [OperationContract]
        [FaultContract(typeof(GeneralFault))]
        [FaultContract(typeof(BusinessFault))]
        [EISHeader(ServiceConstants.Headername, typeof(EISSession), Direction = SoapHeaderDirection.In)]
        [EISAutorize(Permissions = new[] { RoleType.User, RoleType.Admin })]
        GetNewsByUrlsResponse GetNewsByUrls(GetNewsByUrlsRequest request);
        
    }
}
